import request from '../../../utils/request'

export function liveRoomPaginationListApi (page_size, current_page) {
  /**
   * 通过分页数据获取直播房间信息列表接口
  */
  return request({
    url: '/api/games/live-room/?page_size=' + page_size + '&current_page=' + current_page,
    method: 'GET',
  })
}

export function liveRoomSearchPaginationListApi (page_size, current_page, search_data) {
  /**
   * 通过分页数据查询直播房间信息列表接口
  */
  return request({
    url: '/api/games/live-room/?page_size=' + page_size + '&current_page=' + current_page + '&search_data=' + search_data,
    method: 'GET',
  })
}

export function liveRoomListApi () {
  /**
   * 直播房间信息列表接口
  */
  return request({
    url: '/api/games/live-room/',
    method: 'GET'
  })
}

export function liveRoomCreateApi (data) {
  /**
   * 直播房间信息注册接口
  */
  return request({
    url: '/api/games/live-room/',
    method: 'POST',
    data: data
  })
}

export function liveRoomDeleteApi (data) {
  /**
   * 直播房间信息删除接口
  */
  return request({
    url: '/api/games/live-room/' + data['id'] + '/',
    method: 'DELETE',
  })
}

export function liveRoomUpdateApi (data) {
  /**
   * 直播房间信息更新接口
  */
  return request({
    url: '/api/games/live-room/' + data['id'] + '/',
    method: 'PATCH',
    data: data
  })
}

export function liveRoomDetailApi (data) {
  /**
   * 直播房间信息详细接口——单个直播房间信息
  */
  return request({
    url: '/api/games/live-room/' + data['id'] + '/',
    method: 'GET',
  })
}
